package com.ctosb.classviewer.clazz.cp;

import com.ctosb.classviewer.ClassReader;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class CONSTANT_Utf8_info extends Cp_info {

    private short length;
    private byte bytes[];

    //byte转换后，字符串信息
    private String value;

    @Override
    protected void doParse(ClassReader classReader) {
        length = classReader.readShort();
        bytes = classReader.readBytes(length & 0xffff);
        value = new String(bytes);
    }
}
